import {createSlice} from "@reduxjs/toolkit";

export const aiFeedingSlice = createSlice({
    name: "aiFeeding",
    initialState: () => {
        return {
            productId: '',
            selectItem: {},
            selectFileList: [],
            pageRouterParams: {},
        };

    },
    reducers: {
        set_productId(state, action) {
            state.productId = action.payload
        },
        set_selectItem(state,action) {
            state.selectItem = action.payload
        },
        set_selectFileList(state,action) {
            state.selectFileList = action.payload
        },
        set_pageRouterParams(state,action) {
            state.pageRouterParams = action.payload
        }
    }
});

export const {
    set_productId,
    set_selectItem,
    set_selectFileList,
    set_pageRouterParams,
} = aiFeedingSlice.actions;